package com.blog4j.article.model;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

/**
 * @author 98k灬
 * @version v1.0.0
 * @Description : 功能描述
 * @Create on : 2024/7/28 22:19
 **/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class Comment {
    /**
     * 评论ID
     */
    private Integer id;

    /**
     * 父评论ID
     */
    private Integer parentId;

    /**
     * 评论的用户信息
     */
    private CommentUser commentUser;

    /**
     * 被评论的用户信息
     */
    private CommentUser targetUser;

    /**
     * 评论内容
     */
    private String content;

    /**
     * 评论时间
     */
    private String createDate;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<Comment> childrenList;
}
